<?php
/* 
 * Author: Quan Van Sinh
 * Email: sinhvnb@vietnambiz.com
 */
function getAllKeyword(){
    global $DB,$config;
    $sqlTotalRows="SELECT keyword FROM search_keyword";
    $totalRows =  $DB->num_rows($DB->query($sqlTotalRows));
    $totalPages = ceil($totalRows/$config ['total_article_on_admin']);
    
    $start = (($config ['page']*$config ['total_article_on_admin'])-$config ['total_article_on_admin']);
    $limit = $config ['total_article_on_admin'];
    $sql = "SELECT keyword,count FROM search_keyword ORDER BY count DESC LIMIT $start,$limit";
    $rs = $DB->query($sql);
    return Array("rs"=>$rs,"totalRows"=>$totalRows);
}
?>
